Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated stable dependency #19103

Merged
merged 1 commit into from
Sep 5, 2022
Merged

Conversation

dartess
Copy link
Contributor

@dartess dartess commented Sep 4, 2022

Issue:

#17019 (related)

What I did

Replace package stable to native Array#sort method.

Why:

When a storybook is installed, among other things, I get this warning:

npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility

If I understood the usage correctly, the package was used by Node.js. Sorting is stable since version 12 of Node.js. storybook requires Node.js above version 10. Do you plan to upgrade the engine version in version 7?

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

If your answer is yes to any of these, please make sure to include it in your PR.

Copy link
Member

@IanVS IanVS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, I was planning to make this same change as well. Thanks for the contribution!

@IanVS IanVS requested a review from shilman September 5, 2022 03:26
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks so much @dartess !

@shilman shilman merged commit 9546989 into storybookjs:next Sep 5, 2022
@dartess
Copy link
Contributor Author

dartess commented Sep 6, 2022

@IanVS hey! And what about updating the jest? Are there any plans for it? I wanted to try and do an update this week. But it seems to me that I can cross with someone.

@IanVS
Copy link
Member

IanVS commented Sep 6, 2022

@ndelangen @shilman is jest fair game to update for 7.0?

@shilman
Copy link
Member

shilman commented Sep 6, 2022

100% @IanVS

@IanVS
Copy link
Member

IanVS commented Sep 7, 2022

@dartess is upgrading Jest something you'd be willing to take a shot at? I'd recommend going slowly, probably to 27 first, then 28, and maybe even 29. I'm not super familiar with all the ways jest is used internally here, but it sure would be appreciated if you could try it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants